import { Component } from '@angular/core';
import { ModalService } from './service/modal.service';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.less']
})
export class AppComponent {
  title = 'angular-demo';
  constructor(private modalService: ModalService) { }

  ngOnDestroy(): void {
    this.modalService.closeModal();
  }

  showModal(param): void {
    this.modalService.openModal(param);
  }
}
